import axios from "axios";

// axios.defaults.withCredentials = true;

const service = axios.create({
  // withCredentials: true, // send cookies when cross-domain requests
  baseURL: "https://www.94mxd.com",
  timeout: 5000, // request timeout
});

// service.interceptors.request.use(
//   (config) => {
//     // do something before request is sent
//     config.headers["Content-Type"] = "application/json";
//     return config;
//   },
//   (error) => {
//     // do something with request error
//     console.log(error); // for debug
//     return Promise.reject(error);
//   }
// );

service.defaults.withCredentials = true;

export default service;
